basepath=~/mrlab
cd $basepath && rm -rf $basepath/out/*
echo "Compile Master and Worker Program and Move it"
cd $basepath/mrworker/ && go build mrworker.go && mv ./mrworker ../out/
cd $basepath/mrmaster/ && go build mrmaster.go && mv ./mrmaster ../out/
echo "Compile mrapp wc.so"
cd $basepath/mrapp/ && go build -buildmode=plugin wc.go
echo "mv mrapp wc.so to out/"
cp $basepath/mrapp/wc.so $basepath/out/
echo "Copy Input File: in.txt"
cp $basepath/input/*.txt $basepath/out/
echo "ok!"
